package com.skivingcloud.common.utils;

import java.security.SecureRandom;
import java.util.UUID;

public class UuidUtil{

	/**
	 * 32位uuid
	 * @return uuid
	 */
	public static String get32UUID() {
        return UUID.randomUUID().toString().trim().replace("-", "");
	}
	
	/**
	 * 16位纯数字
	 * @return uuid
	 */
	public static String get16NumUUID() {
		SecureRandom random = new SecureRandom();
		long l = System.currentTimeMillis();
        int i = 100 + random.nextInt(999);
        return String.valueOf(l)+ i;
	}
	
	public static void main(String[] args) {
		System.out.println(get16NumUUID());
		System.out.println(get32UUID());
		System.out.println(System.currentTimeMillis());
		System.out.println(System.currentTimeMillis());
		
	}
}

